<h1>类别列表</h1>

<table class="table table-striped table-bordered table-condensed">
  <tr>
    <th>显示名称</th>
    <th>网址名称</th>
    <th>排序编号</th>
    <th>描述信息</th>
    <th>可见性</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @categories.each do |category| %>
  <tr>
    <td><%= category.viewname %></td>
    <td><%= category.urlname %></td>
    <td><%= category.sortid %></td>
    <td><%= category.desc %></td>
    <td><%= category.visible %></td>
    <td><%= link_to 'Show', category %></td>
    <td><%= link_to 'Edit', edit_category_path(category) %></td>
    <td><%= link_to 'Destroy', category, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to '新增类别', new_category_path %>
